﻿using JESAI.Application.Abstractions.Dtos;
using JESAI.Application.Abstractions.Sys.Dtos;
using JESAI.Application.Abstractions.Sys.Querys;
using JESAI.DDD.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JESAI.Application.Abstractions.Sys
{
    public interface IDataSourceService
    {
        Task DelDataSourceTableById(string dataSourceTableId);
        Task DelDataSourceTableByIds(string[] dataSourceTableIds);
        Task<PagedDto<DataSourceTableDto>> GetPageList(DataSourceTablePageQuery datasourceTableQuery);

        Task<List<DataSourceColumnDto>> QueryDataSourceColumnsByTableId(string dataSourceTableId);
        Task SaveOrUpdateDataSourceTable(DataSourceTableInput dataSourceTableInput);

        Task SaveOrUpdateDataSource(DataSourceTableInput dataSourceTableInput, List<DataSourceColumnInput> dataSourceColumnInputs);

        Task SyncDB(string dataSourceTableId);
        Task<List<DataSourceTableDto>> GetAllDataSourceTables();
        Task<List<DataSourceColumnDto>> GetDataSourceColumnsByTableId(string tableId);
    }
}
